import { Body, Controller, Get, Post, Res, Req } from '@nestjs/common'
import { OrderService } from './order.service'
@Controller('order')
export class OrderController {
  constructor(private readonly OrderService: OrderService) { }
  @Get()
  getHello() {
    return this.OrderService.getorderlist()
  }
  @Post('/addOrder')
  addOrder(@Body() body) {
    console.log(1)
    console.log(body)
    return this.OrderService.addorder(body)
  }
  @Post('/selectOrder')
  getOrderList(@Req() req: Request, @Res() res: Response,@Body() body:any) {
    return this.OrderService.getselectorderlist(req, res)
  }
  @Get('/getDate')
  getDate(@Req() req: Request, @Res() res: Response) {
      return this.OrderService.getDate(req, res)
  }
}
